// compile: g++ -o enum_class enum_class.cc -std=c++11
// run: ./enum_class
#include <iostream>

using namespace std;

enum A {
  kAa,  // 默认从0开始
  kAb,
  kAc,
};
enum B {
  kBa,
  kBb,
  kBc,
};
enum class Game : int {
  Kards,
  Dota2,
  HOIV4,
};
enum class Color : char {
  kRed,
  kBlue,
  kGreen,
};

void Test1() {
  A a = A::kAa;
  B b = B::kBa;
  if (a == b) {  // what the fuck？两个不同枚举还能这样玩？
    cout << "a==b" << endl;
  }
}
void Test2() {
  Game game = Game::Kards;
  Color color = Color::kBlue;
  // if(game == color) // 编译出错，不可比较
}
int main() {
  Test1();
  Test2();
  return 0;
}
